If the record type “f” is used for the same CSV file as “d”, “b”, or “t” all fields from both
tables will be included, possibly resulting in many empty data fields.
11.2.9 Encoding
As much as possible, standard CSV encodings are used for all fields, with most
characters being as-is in the output. Time stamps are normally formatted as UNIX
time_t, i.e., the number of seconds since midnight on January 1, 1970.
The format of the file is CSV (comma-separated values), as described in RFC 4180, with
a header line at the beginning of the file describing what field is in which column. Here
is the format from RFC 4180 in short: columns are separated by commas and records
terminated with CRLF. Values may be quoted with double quotes (""), and must be
quoted if its value contains a comma, a double quote or CRLF. A double quote occurring
within double quotes is repeated, like in:
two inches,"2"""
To accommodate writing various record types in the same file, the first column is always
the record type. If an accounting file is configured (or defaulted) to have multiple record
types, all the possible columns from the selected records are included. For example, if a
file was configured as:
records d, b
record-fields delivery timeLogged,orig,rcpt,dlvSourceIp
record-fields bounce timeLogged,orig,rcpt,bounceCat
the resulting file (including a few record of each type) might look like:
type,timeLogged,orig,rcpt,dlvSourceIp,bounceCat
d,1178807903,orig@port25.com,user1@domain.com,10.0.0.1,
d,1178807905,orig@port25.com,user2@domain.com,10.0.0.1,
b,1178807915,orig@port25.com,user3@domain.com,,policy-related
b,1178807915,orig@port25.com,user4@domain.com,,policy-related
Note that the dlvSourceIp field was omitted (empty field at the end) for the 'b' record, and
that the bounceCat was omitted in the 'd' record, because they were not configured.
11.3 Configuring the accounting file
When installing PowerMTA over a previous version that used the previous binary format
of the accounting file, the binary format will remain in place. To use the CSV format
after an upgrade like this, PowerMTA will need to be properly configured. All new
installs in which a previous version of PowerMTA is not present will use the CSV
format.
273
© 2012, Port25 Solutions, Inc. This document contains confidential and proprietary information belonging
to Port25 Solutions, Inc. Not for release or distribution without permission. (v.2012-03-08-01)